function debug(msg){
	var b = getBrowser();
	if(b == 'MSIE6' || b == 'MSIE7'){
		//alert(msg);
	} else if(b == 'Firefox'){
		console.log(msg);
	} else {
        alert("Unsupported Browser");
    }
}

/*
 * #Return MSIE6,MSIE7,Firefox,Safari,Camino,Gecko,Unknown
 */
function getBrowser() {
	if(navigator.userAgent.indexOf("MSIE 6.0")>0) {
		return "MSIE6";
	}
	if(navigator.userAgent.indexOf("MSIE")>0) {
		return "MSIE7";
	}
	if(navigator.userAgent.indexOf("Firefox")>0){
		return "Firefox";
	}
	if(navigator.userAgent.indexOf("Safari")>0) {
		return "Safari";
	}
	if(navigator.userAgent.indexOf("Camino")>0){
		return "Camino";
	}
	if(navigator.userAgent.indexOf("Gecko/")>0){
		return "Gecko";
	}
	return "Unknown";
}